css-deprecated-flexbox: remove visibility checks in LayoutDeprecatedFlexibleBox visibility:collapse is only supported for tables, so all of the visibility checks in this class should be removed. BUG=1015987 TEST=wpt/compat/webkit-box-clamp-visibility-change.html Change-Id: Ib68b03a7942d6cd78b13e3d0bb11ba1a8742cb5d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1898398 Commit-Queue: Scott Violet <sky@chromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/master@{#712735} diff --git a/compat/webkit-box-clamp-visibility-change.html b/compat/webkit-box-clamp-visibility-change.html new file mode 100644 index 0000000..115fa43 --- /dev/null +++ b/compat/webkit-box-clamp-visibility-change.html
@@ -0,0 +1,34 @@ +<!DOCTYPE html> +<link rel="help" href="https://crbug.com/1015987"> +<link rel="match" href="webkit-box-clamp-visibility-change-ref.html"> +<style> + #wb { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + } +</style> +<p>Line-clamp should be respected after removing and changing visibility. +<div id="root" style="border: solid; width: 200px;"> + <div id="container"> + <p id="wb"> + text text text text + text text text text + text text text text + text text text text + text text text text + text text text text + text text text text + </p> + </div> +</div> +<script> + const container = document.getElementById('container'); + const root = document.getElementById('root'); + container.remove(); + container.style.visibility = 'hidden'; + root.appendChild(container); + document.body.offsetTop; + container.style.visibility = ''; +</script>